package day5;

import day4.BankAcc;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * @author oldliu
 * @since 1.0
 */
public class TestCollections {
    public static void main(String[] args) {
        List list = new ArrayList();
        list.add(new BankAcc("hf--5","小蔡","3111","hefei",50333.0F));

        list.add(new BankAcc("hf--1","老吴","123","shanghai",1000000.0F));
        list.add(new BankAcc("hf--2","小刘","1243","shanghai",100030.0F));
        list.add(new BankAcc("hf--3","小李","1523","nanjing",60000.0F));
        list.add(new BankAcc("hf--4","老张","623","shanghai",1000.0F));

//        list.add(12);
//        list.add(24);
//        list.add(14);
//        list.add(5);
//        list.add(62);
//        list.add(81);
//        list.add(11);
//        list.add(12);
        BankAcc  zuida = (BankAcc)Collections.max(list);
        System.out.println("最大：");
        System.out.println(zuida );
        System.out.println("比较之前：");
        System.out.println(list);
        Collections.sort(list);
        System.out.println("比较之后：");
        System.out.println(list);
    }
}
